package com.xzit;

import com.xzit.entity.Account;
import com.xzit.service.AccountService;
import com.xzit.service.AccountServiceImpl_Annotation;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

public class Test {
    public static void main(String[] args) throws Exception {
        ApplicationContext ctx = new ClassPathXmlApplicationContext("bean.xml");
        AccountService accountService = (AccountService) ctx.getBean(AccountServiceImpl_Annotation.class);
//
        final List<Account> list = accountService.list();
        for (Account account : list) {
            System.out.println(account);
        }
    }
}
